3.2.99 \(\int \frac {\sqrt {a+b \sec (e+f x)}}{c+d \sec (e+f x)} \, dx\) [199]

3.2.99.1 Optimal result
3.2.99.2 Mathematica [A] (verified)
3.2.99.3 Rubi [A] (verified)
3.2.99.4 Maple [A] (verified)
3.2.99.5 Fricas [F(-1)]
3.2.99.6 Sympy [F]
3.2.99.7 Maxima [F]
3.2.99.8 Giac [F]
3.2.99.9 Mupad [F(-1)]

3.2.99.1 Optimal result

Integrand size = 27, antiderivative size = 220 \[ \int \frac {\sqrt {a+b \sec (e+f x)}}{c+d \sec (e+f x)} \, dx=-\frac {2 \sqrt {a+b} \cot (e+f x) \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{c f}+\frac {2 (b c-a d) \operatorname {EllipticPi}\left (\frac {2 d}{c+d},\arcsin \left (\frac {\sqrt {1-\sec (e+f x)}}{\sqrt {2}}\right ),\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sec (e+f x)}{a+b}} \tan (e+f x)}{c (c+d) f \sqrt {a+b \sec (e+f x)} \sqrt {-\tan ^2(e+f x)}} \]

output
-2*cot(f*x+e)*EllipticPi((a+b*sec(f*x+e))^(1/2)/(a+b)^(1/2),(a+b)/a,((a+b) 
/(a-b))^(1/2))*(a+b)^(1/2)*(b*(1-sec(f*x+e))/(a+b))^(1/2)*(-b*(1+sec(f*x+e 
))/(a-b))^(1/2)/c/f+2*(-a*d+b*c)*EllipticPi(1/2*(1-sec(f*x+e))^(1/2)*2^(1/ 
2),2*d/(c+d),2^(1/2)*(b/(a+b))^(1/2))*((a+b*sec(f*x+e))/(a+b))^(1/2)*tan(f 
*x+e)/c/(c+d)/f/(a+b*sec(f*x+e))^(1/2)/(-tan(f*x+e)^2)^(1/2)
 
3.2.99.2 Mathematica [A] (verified)

Time = 8.25 (sec) , antiderivative size = 225, normalized size of antiderivative = 1.02 \[ \int \frac {\sqrt {a+b \sec (e+f x)}}{c+d \sec (e+f x)} \, dx=\frac {4 \cos ^2\left (\frac {1}{2} (e+f x)\right ) \sqrt {\frac {\cos (e+f x)}{1+\cos (e+f x)}} \sqrt {\frac {b+a \cos (e+f x)}{(a+b) (1+\cos (e+f x))}} \left (-\left ((a-b) c (c+d) \operatorname {EllipticF}\left (\arcsin \left (\tan \left (\frac {1}{2} (e+f x)\right )\right ),\frac {a-b}{a+b}\right )\right )+2 a \left (c^2-d^2\right ) \operatorname {EllipticPi}\left (-1,\arcsin \left (\tan \left (\frac {1}{2} (e+f x)\right )\right ),\frac {a-b}{a+b}\right )+2 d (-b c+a d) \operatorname {EllipticPi}\left (\frac {c-d}{c+d},\arcsin \left (\tan \left (\frac {1}{2} (e+f x)\right )\right ),\frac {a-b}{a+b}\right )\right ) \sqrt {a+b \sec (e+f x)}}{c (c-d) (c+d) f (b+a \cos (e+f x))} \]

input
Integrate[Sqrt[a + b*Sec[e + f*x]]/(c + d*Sec[e + f*x]),x]
 
output
(4*Cos[(e + f*x)/2]^2*Sqrt[Cos[e + f*x]/(1 + Cos[e + f*x])]*Sqrt[(b + a*Co 
s[e + f*x])/((a + b)*(1 + Cos[e + f*x]))]*(-((a - b)*c*(c + d)*EllipticF[A 
rcSin[Tan[(e + f*x)/2]], (a - b)/(a + b)]) + 2*a*(c^2 - d^2)*EllipticPi[-1 
, ArcSin[Tan[(e + f*x)/2]], (a - b)/(a + b)] + 2*d*(-(b*c) + a*d)*Elliptic 
Pi[(c - d)/(c + d), ArcSin[Tan[(e + f*x)/2]], (a - b)/(a + b)])*Sqrt[a + b 
*Sec[e + f*x]])/(c*(c - d)*(c + d)*f*(b + a*Cos[e + f*x]))
 
3.2.99.3 Rubi [A] (verified)

Time = 0.70 (sec) , antiderivative size = 220, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 4414, 3042, 4271, 4461}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sqrt {a+b \sec (e+f x)}}{c+d \sec (e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sqrt {a+b \csc \left (e+f x+\frac {\pi }{2}\right )}}{c+d \csc \left (e+f x+\frac {\pi }{2}\right )}dx\)

\(\Big \downarrow \) 4414

\(\displaystyle \frac {(b c-a d) \int \frac {\sec (e+f x)}{\sqrt {a+b \sec (e+f x)} (c+d \sec (e+f x))}dx}{c}+\frac {a \int \frac {1}{\sqrt {a+b \sec (e+f x)}}dx}{c}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {(b c-a d) \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )}{\sqrt {a+b \csc \left (e+f x+\frac {\pi }{2}\right )} \left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )}dx}{c}+\frac {a \int \frac {1}{\sqrt {a+b \csc \left (e+f x+\frac {\pi }{2}\right )}}dx}{c}\)

\(\Big \downarrow \) 4271

\(\displaystyle \frac {(b c-a d) \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )}{\sqrt {a+b \csc \left (e+f x+\frac {\pi }{2}\right )} \left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )}dx}{c}-\frac {2 \sqrt {a+b} \cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{c f}\)

\(\Big \downarrow \) 4461

\(\displaystyle \frac {2 (b c-a d) \tan (e+f x) \sqrt {\frac {a+b \sec (e+f x)}{a+b}} \operatorname {EllipticPi}\left (\frac {2 d}{c+d},\arcsin \left (\frac {\sqrt {1-\sec (e+f x)}}{\sqrt {2}}\right ),\frac {2 b}{a+b}\right )}{c f (c+d) \sqrt {-\tan ^2(e+f x)} \sqrt {a+b \sec (e+f x)}}-\frac {2 \sqrt {a+b} \cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{c f}\)

input
Int[Sqrt[a + b*Sec[e + f*x]]/(c + d*Sec[e + f*x]),x]
 
output
(-2*Sqrt[a + b]*Cot[e + f*x]*EllipticPi[(a + b)/a, ArcSin[Sqrt[a + b*Sec[e 
 + f*x]]/Sqrt[a + b]], (a + b)/(a - b)]*Sqrt[(b*(1 - Sec[e + f*x]))/(a + b 
)]*Sqrt[-((b*(1 + Sec[e + f*x]))/(a - b))])/(c*f) + (2*(b*c - a*d)*Ellipti 
cPi[(2*d)/(c + d), ArcSin[Sqrt[1 - Sec[e + f*x]]/Sqrt[2]], (2*b)/(a + b)]* 
Sqrt[(a + b*Sec[e + f*x])/(a + b)]*Tan[e + f*x])/(c*(c + d)*f*Sqrt[a + b*S 
ec[e + f*x]]*Sqrt[-Tan[e + f*x]^2])
 

3.2.99.3.1 Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4271
Int[1/Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[2*(Rt[a 
 + b, 2]/(a*d*Cot[c + d*x]))*Sqrt[b*((1 - Csc[c + d*x])/(a + b))]*Sqrt[(-b) 
*((1 + Csc[c + d*x])/(a - b))]*EllipticPi[(a + b)/a, ArcSin[Sqrt[a + b*Csc[ 
c + d*x]]/Rt[a + b, 2]], (a + b)/(a - b)], x] /; FreeQ[{a, b, c, d}, x] && 
NeQ[a^2 - b^2, 0]
 

rule 4414
Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]/(csc[(e_.) + (f_.)*(x_)]*(d_ 
.) + (c_)), x_Symbol] :> Simp[a/c   Int[1/Sqrt[a + b*Csc[e + f*x]], x], x] 
+ Simp[(b*c - a*d)/c   Int[Csc[e + f*x]/(Sqrt[a + b*Csc[e + f*x]]*(c + d*Cs 
c[e + f*x])), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] & 
& NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
 

rule 4461
Int[csc[(e_.) + (f_.)*(x_)]/(Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]*(cs 
c[(e_.) + (f_.)*(x_)]*(d_.) + (c_))), x_Symbol] :> Simp[-2*(Cot[e + f*x]/(f 
*(c + d)*Sqrt[a + b*Csc[e + f*x]]*Sqrt[-Cot[e + f*x]^2]))*Sqrt[(a + b*Csc[e 
 + f*x])/(a + b)]*EllipticPi[2*(d/(c + d)), ArcSin[Sqrt[1 - Csc[e + f*x]]/S 
qrt[2]], 2*(b/(a + b))], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a* 
d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
 
3.2.99.4 Maple [A] (verified)

Time = 6.16 (sec) , antiderivative size = 400, normalized size of antiderivative = 1.82

method result size
default \(\frac {2 \left (\cos \left (f x +e \right )+1\right ) \left (\operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) a \,c^{2}+\operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) a c d -\operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) b \,c^{2}-\operatorname {EllipticF}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \sqrt {\frac {a -b}{a +b}}\right ) b c d -2 \operatorname {EllipticPi}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), -1, \sqrt {\frac {a -b}{a +b}}\right ) a \,c^{2}+2 \operatorname {EllipticPi}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), -1, \sqrt {\frac {a -b}{a +b}}\right ) a \,d^{2}-2 \operatorname {EllipticPi}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \frac {c -d}{c +d}, \sqrt {\frac {a -b}{a +b}}\right ) a \,d^{2}+2 \operatorname {EllipticPi}\left (\cot \left (f x +e \right )-\csc \left (f x +e \right ), \frac {c -d}{c +d}, \sqrt {\frac {a -b}{a +b}}\right ) b c d \right ) \sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (a +b \right ) \left (\cos \left (f x +e \right )+1\right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sqrt {a +b \sec \left (f x +e \right )}}{f c \left (c -d \right ) \left (c +d \right ) \left (b +a \cos \left (f x +e \right )\right )}\) \(400\)

input
int((a+b*sec(f*x+e))^(1/2)/(c+d*sec(f*x+e)),x,method=_RETURNVERBOSE)
 
output
2/f/c/(c-d)/(c+d)*(cos(f*x+e)+1)*(EllipticF(cot(f*x+e)-csc(f*x+e),((a-b)/( 
a+b))^(1/2))*a*c^2+EllipticF(cot(f*x+e)-csc(f*x+e),((a-b)/(a+b))^(1/2))*a* 
c*d-EllipticF(cot(f*x+e)-csc(f*x+e),((a-b)/(a+b))^(1/2))*b*c^2-EllipticF(c 
ot(f*x+e)-csc(f*x+e),((a-b)/(a+b))^(1/2))*b*c*d-2*EllipticPi(cot(f*x+e)-cs 
c(f*x+e),-1,((a-b)/(a+b))^(1/2))*a*c^2+2*EllipticPi(cot(f*x+e)-csc(f*x+e), 
-1,((a-b)/(a+b))^(1/2))*a*d^2-2*EllipticPi(cot(f*x+e)-csc(f*x+e),(c-d)/(c+ 
d),((a-b)/(a+b))^(1/2))*a*d^2+2*EllipticPi(cot(f*x+e)-csc(f*x+e),(c-d)/(c+ 
d),((a-b)/(a+b))^(1/2))*b*c*d)*(1/(a+b)*(b+a*cos(f*x+e))/(cos(f*x+e)+1))^( 
1/2)*(cos(f*x+e)/(cos(f*x+e)+1))^(1/2)*(a+b*sec(f*x+e))^(1/2)/(b+a*cos(f*x 
+e))
 
3.2.99.5 Fricas [F(-1)]

Timed out. \[ \int \frac {\sqrt {a+b \sec (e+f x)}}{c+d \sec (e+f x)} \, dx=\text {Timed out} \]

input
integrate((a+b*sec(f*x+e))^(1/2)/(c+d*sec(f*x+e)),x, algorithm="fricas")
 
output
Timed out
 
3.2.99.6 Sympy [F]

\[ \int \frac {\sqrt {a+b \sec (e+f x)}}{c+d \sec (e+f x)} \, dx=\int \frac {\sqrt {a + b \sec {\left (e + f x \right )}}}{c + d \sec {\left (e + f x \right )}}\, dx \]

input
integrate((a+b*sec(f*x+e))**(1/2)/(c+d*sec(f*x+e)),x)
 
output
Integral(sqrt(a + b*sec(e + f*x))/(c + d*sec(e + f*x)), x)
 
3.2.99.7 Maxima [F]

\[ \int \frac {\sqrt {a+b \sec (e+f x)}}{c+d \sec (e+f x)} \, dx=\int { \frac {\sqrt {b \sec \left (f x + e\right ) + a}}{d \sec \left (f x + e\right ) + c} \,d x } \]

input
integrate((a+b*sec(f*x+e))^(1/2)/(c+d*sec(f*x+e)),x, algorithm="maxima")
 
output
integrate(sqrt(b*sec(f*x + e) + a)/(d*sec(f*x + e) + c), x)
 
3.2.99.8 Giac [F]

\[ \int \frac {\sqrt {a+b \sec (e+f x)}}{c+d \sec (e+f x)} \, dx=\int { \frac {\sqrt {b \sec \left (f x + e\right ) + a}}{d \sec \left (f x + e\right ) + c} \,d x } \]

input
integrate((a+b*sec(f*x+e))^(1/2)/(c+d*sec(f*x+e)),x, algorithm="giac")
 
output
integrate(sqrt(b*sec(f*x + e) + a)/(d*sec(f*x + e) + c), x)
 
3.2.99.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {a+b \sec (e+f x)}}{c+d \sec (e+f x)} \, dx=\int \frac {\sqrt {a+\frac {b}{\cos \left (e+f\,x\right )}}}{c+\frac {d}{\cos \left (e+f\,x\right )}} \,d x \]

input
int((a + b/cos(e + f*x))^(1/2)/(c + d/cos(e + f*x)),x)
 
output
int((a + b/cos(e + f*x))^(1/2)/(c + d/cos(e + f*x)), x)